package com.liu.mhl.Server;

import com.liu.mhl.dao.MenuDao;
import com.liu.mhl.domain.Menu;

import java.util.List;

public class MenuServer {
    private MenuDao menuDao = new MenuDao();
    public List<Menu> listMenu() {
        return  menuDao.queryMulti("select * from menu", Menu.class);
    }
    //需要一个方法根据Id返回一个Menu对象
    public Menu getMenuById(int id) {
        return menuDao.querySingle("select * from menu where id = ?" , Menu.class,id);
    }
}
